Skip to content

[Web LA] Fix chrome flickers#6172

Merged
m-bert merged 3 commits intomainfrom
@mbert/chrome-flickers
Jul 1, 2024
Merged

[Web LA] Fix chrome flickers#6172
m-bert merged 3 commits intomainfrom
@mbert/chrome-flickers

Conversation

@m-bert
Copy link
Contributor

@m-bert m-bert commented Jun 26, 2024

Summary

Currently some of our animations flicker on google chrome browser. This PR moves setting animation into requestAnimationFrame callback - this way we will be sure that animation will be properly set before next repaint.

Comparison

Before

Nagranie.z.ekranu.2024-06-26.o.13.54.18.mov

After

Nagranie.z.ekranu.2024-06-26.o.13.53.06.mov

Test plan

Tested on default animations example

@m-bert m-bert requested a review from piaskowyk June 26, 2024 12:02
@m-bert m-bert requested a review from piaskowyk July 1, 2024 12:21
Copy link
Member

@piaskowyk piaskowyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@m-bert m-bert added this pull request to the merge queue Jul 1, 2024
Merged via the queue into main with commit 4ded61f Jul 1, 2024
@m-bert m-bert deleted the @mbert/chrome-flickers branch July 1, 2024 14:15
r0h0gg6 pushed a commit to r0h0gg6/react-native-reanimated that referenced this pull request Jul 28, 2025
## Summary

Currently some of our animations flicker on google chrome browser. This
PR moves setting animation into `requestAnimationFrame` callback - this
way we will be sure that animation will be properly set before next
repaint.

## Comparison

### Before


https://github.com/software-mansion/react-native-reanimated/assets/63123542/fe674d23-d1bb-44c3-a870-335c330c7073

### After


https://github.com/software-mansion/react-native-reanimated/assets/63123542/2a4833a7-c3d9-4a59-b108-a7f4cc166f1f

## Test plan

Tested on default animations example
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants